<?php
/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2017-05-17
 * Time: 09:03
 */

namespace app\src\sunsun\common\action;


use app\src\base\action\BaseAction;
use app\src\sunsun\common\logic\SlaveDeviceLogic;

/**
 * Class SlaveDeviceBindAction
 * 解除绑定设备操作
 * @package app\src\sunsun\common\action
 */
class SlaveDeviceUnbindAction extends BaseAction
{
    /**
     * 设备解除绑定
     * @param string $master_did 主设备did
     * @param string $slave_did 从设备did
     * @return array
     */
    public function unbind($master_did, $slave_did)
    {
        $map = [
            'master_did' => $master_did,
            'slave_did' => $slave_did
        ];

        return (new SlaveDeviceLogic())->delete($map);
    }
}